A cache memory has conventionally been utilized for shortening main memory access time and improving the processing performance of a processor.
For example, a cache memory disclosed in Japanese Laid-Open Patent Application No. 6-266620 Publication stores main memory data, on a block basis, into respective entries, and performs, via such entries, transfer control and exclusive access control for the data corresponding to the access from a processing unit performing multi-task processing. Such cache memory is equipped, for each entry, with a task identification information registration unit which registers the identification information of each task of a processing unit, which is set as the subject of the exclusive access control for the block stored in the entry, and performs, on a task basis, exclusive access control for the block stored in the entry, as well as the setting and cancelling of such exclusive access control.
With such cache memory, the exclusive access control in multi-task processing is performed efficiently, and the inconsistency of data used commonly among tasks is eliminated.
However, with the aforementioned cache memory of the conventional technology, there is the problem that, with the task switching by the processor, the hit ratio of the cache memory is influenced by other tasks which are not currently being executed.
For example, in the case of switching from the execution of a task A to the execution of a task B in a situation where an instruction sequence (or data) of the task A is stored in the cache memory, the instruction sequence (or data) of the task A inside the cache memory is, evicted due to the execution of the task B. Should the instruction sequence (or data) of the task A be evicted from the cache memory, there is the problem that a cache miss occurs when the task A is executed again. Particularly, in processes requiring real-timeliness, such as the decoding/encoding of compressed audio data and compressed video data, there is the problem that due to the influence of other tasks following such task switching, the time allocated for a task is reduced by the replacement process in the cache after the task switching, and thus the necessary processing time cannot be secured, and real-timeliness is lost or alternatively, processing time cannot be guaranteed.